import request from '@/utils/request'

// 首页-产能统计
export function ProductRecordCount(query) {
  return request({
    url: '/home/kanban/productRecordMonth',
    method: 'get',
    params: query
  })
}

// 首页-当日产量
export function GetBottleDay(query) {
  return request({
    url: '/Productionline/interfaceReport/getBottleDay',
    method: 'get',
    params: query
  })
}
// 首页-计算箱数
export function GetBoxDay(query) {
  return request({
    url: '/Productionline/interfaceReport/getBoxDay',
    method: 'get',
    params: query
  })
}
// 首页-生产计划进度
export function ProductPlanCount(query) {
  return request({
    url: '/home/kanban/productPlanCount',
    method: 'get',
    params: query
  })
}

// 首页-七率统计分析
export function ProductionProcess(query) {
  return request({
    url: '/productionProcess/analysisProduct/kanbanmain',
    method: 'put',
    data: query
  })
}

// 首页-温湿度统计
export function humiture() {
  return request({
    url: '/productionProcess/bulk_record/humiture',
    method: 'get',
  })
}

// 首页-能源数据分析
export function energySy(userId) {
  return request({
    url: '/productionProcess/productionmeterday/energySy/' + userId,
    method: 'get'
  })
}
// 首页-安全生产天数
export function SafeP(deptId) {
  return request({
    url: '/productionProcess/productionmeterday/safeP/' + deptId,
    method: 'get'
  })
}
//当天电能
export function electricDay() {
  return request({
    url: '/Productionline/interfaceReport/getDRDN',
    method: 'get'
  })
}
//当月电能
export function electricMonth() {
  return request({
    url: '/Productionline/interfaceReport/getDYDN',
    method: 'get'
  })
}

export function getEnergyDay(query) {
  return request({
    url: '/Productionline/interfaceReport/getEnergyDay',
    method: 'get',
    params: query
  })
}

export function getEnergyMonth(query) {
  return request({
    url: '/Productionline/interfaceReport/getEnergyMonth',
    method: 'get',
    params: query
  })
}




//产线设备监控
export function getTag() {
  return request({
    url: '/Productionline/interfaceTag/getTag',
    method: 'get'
  })
}
//首页温湿度统计
export function getRealWsd() {
  return request({
    url: '/report/result/getRealWsd',
    method: 'get'
  })
}

//人均产出、单板产出、维修费用
export function KanbanLeft(query) {
  return request({
    url: '/productionProcess/analysis_singelproduction/KanbanLeft',
    method: 'get',
    params: query
  })
}

//水利用率
export function waterMainKanBan(query) {
  return request({
    url: '/productionProcess/water_sum/mainKanBan',
    method: 'put',
    data: query
  })
}

//吨耗电
export function elecMainKanBan(query) {
  return request({
    url: '/productionProcess/elec_sum/mainKanBan',
    method: 'put',
    data: query
  })
}


//客诉率
export function complaintNKSJ(query) {
  return request({
    url: '/productionProcess/complain/complaintNKSJ',
    method: 'get',
    params: query
  })
}
//制成率
export function processTotalNKSJ(query) {
  return request({
    url: '/productionProcess/rptprocess/processTotalNKSJ',
    method: 'get',
    params: query
  })
}
//不达标
export function getinternalNKSJ(query) {
  return request({
    url: '/productionProcess/unstand/getinternalNKSJ',
    method: 'get',
    params: query
  })
}

//制成合格率统计
export function listChart(query) {
  return request({
    url: '/productionProcess/analysisProduct/listChart',
    method: 'get',
    params: query
  })
}
//七率统计分析
export function waterAndElectric(query) {
  return request({
    url: '/productionProcess/water_sum/waterAndElectric',
    method: 'put',
    data: query
  })
}